package com.yan.furns.web.servlet.notUsed;

import javax.servlet.http.HttpServlet;

/**
 * @author Yzb
 * @version 1.0
 */
public class LoginServlet extends HttpServlet {
//	private MemberService memberService = new MemberServiceImpl();
//	@Override
//	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
////		super.doPost(req, resp);
//		String username = req.getParameter("username");
//		String password = req.getParameter("password");
////		System.out.println("LoginServlet doPost: username=" + username + " password=" + password);
//
//		Member member = memberService.login(username, password);
////		System.out.println(member);
//		if (member != null) {
////			System.out.println("login success");
//			req.getRequestDispatcher("/views/member/login_ok.jsp")
//					.forward(req, resp);
//		} else {
//			// 展示错误信息
//			req.setAttribute("msg", "用户名或者密码错误");
//			// 回显用户名
//			req.setAttribute("username", username);
//			req.getRequestDispatcher("/views/member/login.jsp")
//					.forward(req, resp);
//		}
//	}
//
//	@Override
//	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//		doPost(req, resp);
//	}
}
